/*
 * Copyright (c) 2015—2030 GantSoftware.Co.Ltd. All rights reserved.
 *  <p>
 *  Unless required by applicable law or agreed to in writing, software
 *  is not allowed to be distributed or copied without the license from
 *  GantSoftware.Co.Ltd. Please contact the company for more information.
 */
package com.gantang.gax.engine.service.impl;

import com.gantang.gax.engine.eo.Engine;
import com.gantang.gax.engine.factory.EngineFactory;
import com.gantang.gax.engine.model.EngineCreator;
import com.gantang.gax.engine.service.AbstractEngineCreatorService;
import com.gantang.gax.engine.service.EngineCreatorService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service("logicEngineCreatorService")
public class LogicEngineCreatorServiceImpl extends AbstractEngineCreatorService implements EngineCreatorService {
    @Autowired
    EngineFactory maxSatLogicEngineFactory;
    @Autowired
    EngineFactory minSatLogicEngineFactory;

    @Override
    public Boolean valid(EngineCreator engineCreator) {
        return false;
    }

    @Override
    public Engine create(EngineCreator engineCreator) {
        return maxSatLogicEngineFactory.createEngine(engineCreator);
    }

    @Override
    public Engine asyncCreate(EngineCreator engineCreator) {
        return maxSatLogicEngineFactory.createEngine(engineCreator);
    }
}
